<!--
 * @FilePath     : /layui/demo/13232.html
 * @Description  : table 是否初始隐藏列
 * @Date         : 2025-02-14 13:16
 * @Author       : Fang YingGui
 * @LastEditors  : fangyinggui 18715384437@163.com
 * @LastEditTime : 2025-02-14 13:16
-->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>documentName</title>
    <link rel="stylesheet" href="/layui/dist/css/layui.css" />
  </head>
  <body>
    <table id="demo" lay-filter="test"></table>

    <script src="/layui/dist/layui.js"></script>
    <script src="/layui/table/common.js"></script>
    <script>
      var table = layui.table

      table.render({
        elem: '#demo',
        data: tableData,

        cols: [
          [
            {
              field: 'id',
              title: 'ID',
              minWidth: 400,
              /**
               * @brief: 是否初始隐藏列
               * @value {boolean}
               * true 隐藏（设置后列隐藏，每个单元格被添加 layui-hide类名，对应旧版本的样式 'display: none !important;'）
               * false (def)不隐藏
               */
              hide: true,
            },
            // 很多列-start
            { field: 'username', title: '名称', width: 160 },
            // 很多列-end
            {
              //
              field: 'wealth',
              title: '财富',
              width: 160,
              fixed: 'right',
            },
          ],
        ],
      })
    </script>
  </body>
</html>